package com.leo.oplayer.filter.bak;

import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.util.Log;

public class MyPhoneStateListener extends PhoneStateListener {
  
	private static final String TAG = "MyPhoneStatListener";
	
	private String outPhoneNumber = null;
	
	public void onCallStateChanged(int state,String incomingNumber){ 
	    switch(state) 
	    { 
	      case TelephonyManager.CALL_STATE_IDLE: 
	        Log.i(TAG, "IDLE"); 
	      break; 
	      case TelephonyManager.CALL_STATE_OFFHOOK: 	       
	          Log.i(TAG, "ACCEPT :"+incomingNumber);
	      break; 
	     case TelephonyManager.CALL_STATE_RINGING: 
	        Log.i(TAG, "RINGING"); 
	     break; 
	    } 
     }

	public String getOutPhoneNumber() {
		return outPhoneNumber;
	}

	public void setOutPhoneNumber(String outPhoneNumber) {
		this.outPhoneNumber = outPhoneNumber;
	}
	
	
}

